/* 
 * File:   TigerReward.cpp
 * Author: Hadrien
 * 
 * Created on 12 juillet 2012, 00:16
 */

#include "TigerReward.h"

TigerReward::TigerReward() {
}

TigerReward::~TigerReward() {
}

double TigerReward::operator()(const TigerState s, const TigerAction& a) const {
    switch (a.getValue()) {
        case TigerAction::listen:
            return -1;
        case TigerAction::open_left:
            if (s.getValue() == TigerState::tiger_left)
                return -100;
            else
                return 10;
        case TigerAction::open_right:
            if (s.getValue() == TigerState::tiger_right)
                return -100;
            else
                return 10;
    }
}
